jade.core.behaviours
Class NonDeterministicBehaviour

java.lang.Object
  |
  +--jade.core.behaviours.Behaviour
        |
        +--jade.core.behaviours.CompositeBehaviour
              |
              +--jade.core.behaviours.ParallelBehaviour
                    |
                    +--jade.core.behaviours.NonDeterministicBehaviour

Deprecated. Use ParallelBehaviour instead. Composite behaviour with non deterministic children scheduling. It is a ComplexBehaviour that executes its children behaviours non deterministically, and it terminates when a particular condition on its sub-behaviours is met. Static Factory Methods are provided to get a NonDeterministicBehaviour that ends when all its sub-behaviours are done, when any sub-behaviour terminates or when N sub-behaviours have finished.

public class NonDeterministicBehaviour
extends ParallelBehaviour

Author:
Giovanni Rimassa - Universita` di Parma
See Also:
Serialized Form

Inner classes inherited from class jade.core.behaviours.Behaviour
Behaviour.RunnableChangedEvent
 
Fields inherited from class jade.core.behaviours.ParallelBehaviour
WHEN_ALL, WHEN_ANY
 
Fields inherited from class jade.core.behaviours.CompositeBehaviour
currentExecuted
 
Fields inherited from class jade.core.behaviours.Behaviour
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent
 
Constructor Summary
  NonDeterministicBehaviour(Agent a, int endCondition)
          Deprecated. Constructor
protected NonDeterministicBehaviour(int endCondition)
          Deprecated. Constructor
 
Method Summary
static NonDeterministicBehaviour createWhenAll()
          Deprecated. Static Factory Method.
static NonDeterministicBehaviour createWhenAll(Agent a)
          Deprecated. Static Factory Method.
static NonDeterministicBehaviour createWhenAny()
          Deprecated. Static Factory Method.
static NonDeterministicBehaviour createWhenAny(Agent a)
          Deprecated. Static Factory Method.
static NonDeterministicBehaviour createWhenN(Agent a, int howMany)
          Deprecated. Static Factory Method.
static NonDeterministicBehaviour createWhenN(int howMany)
          Deprecated. Static Factory Method.
 
Methods inherited from class jade.core.behaviours.ParallelBehaviour
addSubBehaviour, checkTermination, getChildren, getCurrent, handle, removeSubBehaviour, reset, scheduleFirst, scheduleNext
 
Methods inherited from class jade.core.behaviours.CompositeBehaviour
action, block, done, onEnd, onStart, postAction, preAction, restart
 
Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, getDataStore, isRunnable, root, setAgent, setDataStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonDeterministicBehaviour

protected NonDeterministicBehaviour(int endCondition)
Deprecated. 
Constructor

NonDeterministicBehaviour

public NonDeterministicBehaviour(Agent a,
                                 int endCondition)
Deprecated. 
Constructor
Method Detail

createWhenAll

public static NonDeterministicBehaviour createWhenAll()
Deprecated. 
Static Factory Method. This method creates a new NonDeterministicBehaviour that terminates when all its children end. It does not set the owner agent for this behaviour.
Returns:
A new NonDeterministicBehaviour.

createWhenAll

public static NonDeterministicBehaviour createWhenAll(Agent a)
Deprecated. 
Static Factory Method. This method creates a new NonDeterministicBehaviour that terminates when all its children end. It sets the owner agent for this behaviour.
Parameters:
a - The agent this behaviour belongs to.
Returns:
A new NonDeterministicBehaviour.

createWhenAny

public static NonDeterministicBehaviour createWhenAny()
Deprecated. 
Static Factory Method. This method creates a new NonDeterministicBehaviour that terminates when any among its children ends. It does not set the owner agent for this behaviour.
Returns:
A new NonDeterministicBehaviour.

createWhenAny

public static NonDeterministicBehaviour createWhenAny(Agent a)
Deprecated. 
Static Factory Method. This method creates a new NonDeterministicBehaviour that terminates when any among its children ends. It sets the owner agent for this behaviour.
Parameters:
a - The agent this behaviour belongs to.
Returns:
A new NonDeterministicBehaviour.

createWhenN

public static NonDeterministicBehaviour createWhenN(int howMany)
Deprecated. 
Static Factory Method. This method creates a new NonDeterministicBehaviour that terminates when at least N of its children end. It does not set the owner agent for this behaviour.
Parameters:
howMany - The number of children behaviour that must terminate to make this NonDeterministicBehaviour finish.
Returns:
A new NonDeterministicBehaviour.

createWhenN

public static NonDeterministicBehaviour createWhenN(Agent a,
                                                    int howMany)
Deprecated. 
Static Factory Method. This method creates a new NonDeterministicBehaviour that terminates when at least N of its children end. It sets the owner agent for this behaviour.
Parameters:
a - The agent this behaviour belongs to.
howMany - The number of children behaviour that must terminate to make this NonDeterministicBehaviour finish.
Returns:
A new NonDeterministicBehaviour.